feat(plugin-report): server-supplied totals in dataset matrix reports#1669
Merged
Conversation
Framework PR objectstack-ai/objectstack#1779 (issue #1753) added server-side totals to queryDataset. The matrix renderer now requests totals: { groupings: [rows, columns, []] } and renders the returned pre-aggregated rows: a trailing Total column per measure (row subtotals), a trailing Total row (column subtotals), and the grand total at their intersection — matched to pivot headers via the same bucketId logic. No totals in the response (older server) renders exactly as before; the client never re-aggregates (ADR-0021). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Framework PR objectstack-ai/framework#1779 (issue objectstack-ai/framework#1753) added server-side totals to
queryDataset: the selection acceptstotals: { groupings: string[][] }and the result carries pre-aggregatedtotalsentries with dimension labels resolved and the same measure columns as the primary rows.This wires that into the dataset matrix report renderer:
type: 'matrix'reports now passtotals: { groupings: [rows, columns, []] }in the queryDataset selection (row subtotals, column subtotals, grand total).DatasetMatrixTableplaces the server-supplied rows — a trailing Total column per measure (row subtotals, matched to row headers by the samebucketIdused for the pivot), a trailing Total row (column subtotals), and the grand total ([]grouping) at their intersection. Totals entries are matched by theirdimensionsarray.totals(older server) renders exactly as today — the client never re-aggregates bucketed values (ADR-0021 governance red line; the file header comment now documents that totals are server-supplied).Tests
pnpm vitest runinpackages/plugin-report: 32/32 pass;pnpm buildandpnpm lintclean.🤖 Generated with Claude Code